import { requestClient } from '#/api/request';

// 获取账号列表
export const getPage = (params: any) =>
  requestClient.get('/manager/user/page', { params });

// 切换用户状态
export const setStatus = (params: any) =>
  requestClient.post('/manager/user/setStatus', params);

// 检查用户名称
export const checkUserName = (params: any) =>
  requestClient.post('/manager/user/checkUserName', params);

// 添加用户
export const add = (params: any) =>
  requestClient.post('/manager/user/add', params);

// 更新用户
export const update = (params: any) =>
  requestClient.post('/manager/user/update', params);

// 更新用户密码
export const password = (params: any) =>
  requestClient.post('/manager/user/update/password', params);

// 获取用户角色列表
export const getAuthRoleList = (params: any) =>
  requestClient.get('/role/getAuthRoleList', { params });

// 删除用户
export const remove = (params: any) =>
  requestClient.post('/manager/user/remove', params);

// 设置用户角色
export const setRole = (params: any) =>
  requestClient.post('/manager/user/setRole', params);
